/******************************************************************************
 * @File name   :      ISmContentService.java
 *
 * @Author      :      chen shixiang
 *
 * @Date        :      2011-7-7
 *
 * @Copyright Notice: 
 * Copyright (c) 2011 SGM, Inc. All  Rights Reserved.
 * This software is published under the terms of the SGM Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who         Version        Comments
 * 2011-7-7 下午02:27:21        chen shixiang     1.0            Initial Version
 * 2011-9-23 下午06:01:35     Wu Jianxi           1.1         add interface method generateSmsContent
 * 2011-9-27 上午09:41:38     Wu Jianxi           1.2          remove method generateSmsContent and add method createSmsContent
 *****************************************************************************/
package com.cap.bts.framework.sms.service;

import java.util.List;
import java.util.Map;

import com.cap.bts.commonfunc.common.dto.SmsContentDetailDto;
import com.cap.bts.commonfunc.sms.domain.SmContent;
import com.cap.bts.commonfunc.sms.domain.SmsTemplate;
import com.cap.bts.commonfunc.sms.dto.SmsContentResultDto;
import com.cap.bts.commonfunc.sms.dto.SmsStatus;
import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;

/**
 *
 */
public interface ISmContentService extends IBaseService {

    /**
     * send message
     * 
     * @Date : 2011-7-7
     * @throws AppException
     *             AppException
     */
    public void sendMessage() throws AppException;

    /**
     * create sms instances.
     * 
     * @Date : 2011-9-20
     * @param smContent
     * @throws AppException
     */
     public SmContent  createSmsContent(SmContent smContent) throws AppException;
    
    /**
     * delete sms instance by business item id and business type
     * @Date        :      2011-9-20
     * @param businessType
     * @param businessItemId
     * @throws AppException
     */
    void deleteSmsContent(int businessType, long businessItemId) throws AppException;
    
    /**
     * 
     * @Date : 2011-9-27
     * @param smsTemplate
     * @param paraMap
     * @return
     */
     String generateSmsContent(SmsTemplate smsTemplate,
            Map<String, String> paraMap) throws AppException;
    
    
    /**
     * 新增短信内容
     * @Date        :      2011-9-27
     * @param dto
     * @throws AppException
     */
     public SmContent createSmsContent(SmsContentDetailDto dto) throws AppException;
    /**
     * 
     * @Date        :      2011-12-28
     * @param dto
     * @return
     * @throws AppException
     */
    public SmsContentResultDto generateSmsContent(SmsContentDetailDto dto) throws AppException;
    
    public void batchInsertStatus(List<SmsStatus> dataList) throws AppException;
}
